﻿#pragma once

#include <iostream>
#include <string>
#include "rdkafkacpp.h"

class ExampleProducer {
public:
    ExampleProducer(const std::string& brokers, const std::string& topic_name);
    ~ExampleProducer();

    void produce(const std::string& message);

private:
    RdKafka::Conf* conf;
    RdKafka::Producer* producer;
    RdKafka::Topic* topic;
    std::string errstr;
};